<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="#{webGlobal.url_template}/default/main.xhtml">
	<ui:define name="head">
		<link href="#{webGlobal.url_module}/team/r/css/main.css" rel="stylesheet" />
	</ui:define>
	
	<ui:define name="content">
		<div class="main-container" style="margin: 0 auto;">
			<div class="inner-container" style="margin: 0 auto;">
				<div class="container well" style="margin: 100px auto;">
					<h:form prependId="false">
				    	<h3>Tournoi : #{addTeamToTournament.oneTeam.tournament.name}</h3>
				    	
				    	<br />
				    	
				    	<h:form prependId="false" styleClass="form-horizontal" role="form">
					    	<ui:repeat var="onePlayer" value="#{addTeamToTournament.listPlayer}" varStatus="status">
					    		<div class="form-group">
					    			<div class="col-xs-6">
								    	<label>Joueur #{status.index + 1}</label>
								    	<h:inputText value="#{onePlayer.firstName}" styleClass="form-control" placeholder="Nom du joueur"/>
								    	<h:inputText value="#{onePlayer.lastName}" styleClass="form-control" placeholder="Prénom du joueur"/>
								  	</div>
								</div>
					    	</ui:repeat>
					    	
					    	<div class="form-group">
					    		<h:commandButton value="Enregistrer" action="#{addTeamToTournament.saveInformation()}" styleClass="form-control btn btn-success" />
					    		<h:outputLink value="#{webGlobal.url_module}/index/index.jsf" 
				    					styleClass="btn btn-primary btn-lg btn-block" style="margin-top: 20px;">Retour à l'accueil</h:outputLink>
					    	</div>
				    	</h:form>
				    </h:form>
				</div>
			</div>
		</div>
	    
	    
 	</ui:define>
</ui:composition>
</html>